<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>BOOST_GEOMETRY_REGISTER_MULTI_LINESTRING</title>
<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../../index.html" title="Chapter 1. Geometry">
<link rel="up" href="../register.html" title="Macro's for adaption">
<link rel="prev" href="boost_geometry_register_linestring_templated.html" title="BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED">
<link rel="next" href="boost_geometry_register_multi_linestring_templated.html" title="BOOST_GEOMETRY_REGISTER_MULTI_LINESTRING_TEMPLATED">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boost_geometry_register_linestring_templated.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../register.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost_geometry_register_multi_linestring_templated.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="geometry.reference.adapted.register.boost_geometry_register_multi_linestring"></a><a class="link" href="boost_geometry_register_multi_linestring.html" title="BOOST_GEOMETRY_REGISTER_MULTI_LINESTRING">BOOST_GEOMETRY_REGISTER_MULTI_LINESTRING</a>
</h5></div></div></div>
<p>
            <a class="indexterm" name="idm45246452030032"></a>
Macro to register a multi_linestring.
          </p>
<h6>
<a name="geometry.reference.adapted.register.boost_geometry_register_multi_linestring.h0"></a>
            <span class="phrase"><a name="geometry.reference.adapted.register.boost_geometry_register_multi_linestring.description"></a></span><a class="link" href="boost_geometry_register_multi_linestring.html#geometry.reference.adapted.register.boost_geometry_register_multi_linestring.description">Description</a>
          </h6>
<p>
            The macro BOOST_GEOMETRY_REGISTER_MULTI_LINESTRING registers a multi_linestring
            such that it is recognized by Boost.Geometry and that Boost.Geometry
            functionality can used with the specified type. The multi_linestring
            may contain template parameters, which must be specified then.
          </p>
<h6>
<a name="geometry.reference.adapted.register.boost_geometry_register_multi_linestring.h1"></a>
            <span class="phrase"><a name="geometry.reference.adapted.register.boost_geometry_register_multi_linestring.synopsis"></a></span><a class="link" href="boost_geometry_register_multi_linestring.html#geometry.reference.adapted.register.boost_geometry_register_multi_linestring.synopsis">Synopsis</a>
          </h6>
<p>
</p>
<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_GEOMETRY_REGISTER_MULTI_LINESTRING</span><span class="special">(</span><span class="identifier">MultiLineString</span><span class="special">)</span></pre>
<p>
          </p>
<h6>
<a name="geometry.reference.adapted.register.boost_geometry_register_multi_linestring.h2"></a>
            <span class="phrase"><a name="geometry.reference.adapted.register.boost_geometry_register_multi_linestring.parameters"></a></span><a class="link" href="boost_geometry_register_multi_linestring.html#geometry.reference.adapted.register.boost_geometry_register_multi_linestring.parameters">Parameters</a>
          </h6>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                    <p>
                      Name
                    </p>
                  </th>
<th>
                    <p>
                      Description
                    </p>
                  </th>
</tr></thead>
<tbody><tr>
<td>
                    <p>
                      MultiLineString
                    </p>
                  </td>
<td>
                    <p>
                      multi_linestring type to be registered
                    </p>
                  </td>
</tr></tbody>
</table></div>
<h6>
<a name="geometry.reference.adapted.register.boost_geometry_register_multi_linestring.h3"></a>
            <span class="phrase"><a name="geometry.reference.adapted.register.boost_geometry_register_multi_linestring.header"></a></span><a class="link" href="boost_geometry_register_multi_linestring.html#geometry.reference.adapted.register.boost_geometry_register_multi_linestring.header">Header</a>
          </h6>
<p>
            <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">geometries</span><span class="special">/</span><span class="keyword">register</span><span class="special">/</span><span class="identifier">multi_linestring</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
          </p>
<h6>
<a name="geometry.reference.adapted.register.boost_geometry_register_multi_linestring.h4"></a>
            <span class="phrase"><a name="geometry.reference.adapted.register.boost_geometry_register_multi_linestring.example"></a></span><a class="link" href="boost_geometry_register_multi_linestring.html#geometry.reference.adapted.register.boost_geometry_register_multi_linestring.example">Example</a>
          </h6>
<p>
            Show the use of the macro BOOST_GEOMETRY_REGISTER_MULTI_LINESTRING
          </p>
<p>
</p>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>

<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">geometries</span><span class="special">/</span><span class="identifier">linestring</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">geometries</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">/</span><span class="identifier">boost_tuple</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">geometries</span><span class="special">/</span><span class="keyword">register</span><span class="special">/</span><span class="identifier">multi_linestring</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>

<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">model</span><span class="special">::</span><span class="identifier">linestring</span>
    <span class="special">&lt;</span>
        <span class="identifier">boost</span><span class="special">::</span><span class="identifier">tuple</span><span class="special">&lt;</span><span class="keyword">float</span><span class="special">,</span> <span class="keyword">float</span><span class="special">&gt;</span>
    <span class="special">&gt;</span> <span class="identifier">linestring_type</span><span class="special">;</span>

<span class="identifier">BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS</span><span class="special">(</span><span class="identifier">cs</span><span class="special">::</span><span class="identifier">cartesian</span><span class="special">)</span>
<span class="identifier">BOOST_GEOMETRY_REGISTER_MULTI_LINESTRING</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">deque</span><span class="special">&lt;</span><span class="identifier">linestring_type</span><span class="special">&gt;)</span>

<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
<span class="special">{</span>
    <span class="comment">// Normal usage of std::</span>
    <span class="identifier">std</span><span class="special">::</span><span class="identifier">deque</span><span class="special">&lt;</span><span class="identifier">linestring_type</span><span class="special">&gt;</span> <span class="identifier">lines</span><span class="special">(</span><span class="number">2</span><span class="special">);</span>
    <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">read_wkt</span><span class="special">(</span><span class="string">"LINESTRING(0 0,1 1)"</span><span class="special">,</span> <span class="identifier">lines</span><span class="special">[</span><span class="number">0</span><span class="special">]);</span>
    <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">read_wkt</span><span class="special">(</span><span class="string">"LINESTRING(2 2,3 3)"</span><span class="special">,</span> <span class="identifier">lines</span><span class="special">[</span><span class="number">1</span><span class="special">]);</span>

    <span class="comment">// Usage of Boost.Geometry</span>
    <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"LENGTH: "</span>  <span class="special">&lt;&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">length</span><span class="special">(</span><span class="identifier">lines</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>

    <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
<span class="special">}</span>
</pre>
<p>
          </p>
<p>
            Output:
          </p>
<pre class="programlisting">LENGTH: 2.82843
</pre>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2009-2021 Barend Gehrels,
      Bruno Lalande, Mateusz Loskot, Adam Wulkiewicz, Oracle and/or its affiliates<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boost_geometry_register_linestring_templated.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../register.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost_geometry_register_multi_linestring_templated.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
